<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .title {
            font-size: 30px;
        }
        body{
            width: 100%;
            height: 100%;
            background-color: gray;
        }
    </style>
</head>
<body>
<div class="title">h5页面</div>
<button onclick="openPhoto()">打开相册</button>
<img style="width: 100px;height: 100px" id="myImg"></img>
</body>
</html>

<script>
    function openPhoto(){
        //可以调用鸿蒙端注入方法
        if(window.itluma){
            window.itluma.openPhoto() //调用鸿蒙端注入的方法
        }
    }

    //设置图片地址
    function setPhotoUrl(url){
          document.querySelector("#myImg").src = url
    }
</script>